package com.wangsd.web.coupon.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * 商户表
 */
@Data
@Entity
@Table(name = "merchant")
@ApiModel(value = "商户", description = "商户")
public class Merchant {

    @ApiModelProperty(value = "id")
    /*mybatis plus 自增主键*/
    @TableId(type = IdType.AUTO)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @ApiModelProperty(value = "（逻辑删除）是否已删；0，未删，1，已删")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    @ApiModelProperty(value = "商户名称")
    private String name;

    @ApiModelProperty(value = "营业执照名称")
    private String licenseName;

    @ApiModelProperty(value = "商户地址")
    private String address;

    @ApiModelProperty(value = "云支付门店id")
    private String outShopId;

    @ApiModelProperty(value = "子商户号")
    private String subMchId;

    @ApiModelProperty(value = "联系人")
    private String contact;

    @ApiModelProperty(value = "联系人手机")
    private String mobile;

    @ApiModelProperty(value = "门店座机")
    private String telephone;

    @ApiModelProperty(value = "商圈id")
    private Long companyId;

    @ApiModelProperty(value = "检索标识")
    private String code;

    @Column(name = "status",columnDefinition = "int(0) default 0 not null")
    @ApiModelProperty(value = "门店状态 0未认证，1认证中，2认证成功，3认证失败")
    private Integer status;

    @ApiModelProperty(value = "审核备注")
    private String remark;

    @Transient
    @TableField(exist = false)
    @ApiModelProperty(value = "商圈名称")
    private String companyName;

}
